﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _20170202_TV
{
    class Chanel
    {
        private int number;
        private string name;
        private static int id = 0;

        public Chanel(string name)
        {
            number = ++id;
            this.name = name;
        }

        public int Number
        {
            get
            {
                return number;
            }
        }

        public string Name
        {
            get
            {
                return name;
            }
        }

        public override string ToString()
        {
            return string.Format("Канал {0}: {1}", number, name);
        }
    }
}
